<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>添加商品</title>
    <!-- 上传插件引入 -->
    <!-- 注意引入的jq只能有一个，两个会冲突 -->
    <!-- 如果上传插件不能用，可能是引入的文件没引入对 -->
    <script type="text/javascript" src="__STATIC__/uploadify/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
    <link href="__STATIC__/uploadify/uploadify.css" type="text/css" rel="stylesheet"></link>
    <!-- 百度编辑器引入 -->
    <script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor1_4_3/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor1_4_3/ueditor.all.min.js"> </script>
    <script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor1_4_3/lang/zh-cn/zh-cn.js"></script>
    <!-- bootstrap和hdjs引入 -->
    <link rel="stylesheet" href="__STATIC__/bootstrap/css/bootstrap.min.css" />
    <script type="text/javascript" src="__STATIC__/hdjs/hdjs.min.js"></script>
    <link rel="stylesheet" href="__STATIC__/hdjs/hdjs.css" />
    <css file="__CONTROLLER_VIEW__/goods_add.css"/>
    <style type="text/css">
		.checkbox{
			 margin-left:5px;
			 width:90px;
			 margin-top: 10px;
		}
		textarea{
			width: 300px;
			height: 100px;
		}
    </style>
    
</head>
<body>
<div class="wrap">
    <div class="hd-title-header">添加商品</div>
    <form action="{|U:'Admin/ShopGoods/goods_add'}" method="post" class="form-inline hd-form" enctype="multipart/form-data">
        <table class="hd-table hd-table-list">
            <tr>
                <th class="w100">商品名称</th>
                <td class="w100">
                    <input type="text" name="gname" class="w200"/> 
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">货品编号</th>
                <td>
                    <input type="text" name="gnumber" class="w200" value=""/>
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">所属品牌</th>
                <td>
                    <select name="shop_brand_bid" class="w200 leixing">
                        <foreach from="$brandData" key="$k" value="$v">
                        <option value="{$v.bid}">{$v.bname}</option>
                        </foreach>
                    </select>
                </td>
                <td></td>
            </tr>
            
            <tr>
                <th class="w100">所属分类</th>
                <td>
                    <select name="shop_category_cid" class="w200">
                    <foreach from="$CategoryData" key="$k" value="$v">
                    	<option value="{$v.shop_type_tid}">{$v._name}</option>
                    </foreach>
                    </select>
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">点击次数</th>
                <td>
                    <input type="text" name="click" class="w200" value=""/>
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">库存数量</th>
                <td>
                    <input type="text" name="stock" class="w200" value=""/>
                </td>
                <td></td>
            </tr>
            
            <tr>
                <th class="w100">缩略图</th>
                <td>
                <!-- 图片上传插件 -->
                    <div lab="uploadFile">
                                <input id="file" type="file" multiple="true">
                                <span>类型: *.jpg,*.png 大小: 2000KB 数量: 10</span>
                                <script type="text/javascript">
                                    $(function() {
                                        $('#file').uploadify({
                                            'formData'     : {//POST数据
                                                '<?php echo session_name();?>' : '<?php echo session_id();?>',
                                            },
                                            'fileTypeDesc' : '上传文件',//上传描述
                                            'fileTypeExts' : '{$set['filetype']}',
                                            'swf'      : '__STATIC__/uploadify/uploadify.swf',
                                            'uploader' : '{|U:"upload"}',
                                            'buttonText':'选择文件',
                                            'fileSizeLimit' : '2000KB',
                                            'uploadLimit' : 1000,//上传文件数
                                            'width':65,
                                            'height':25,
                                            'successTimeout':10,//等待服务器响应时间
                                            'removeTimeout' : 0.2,//成功显示时间
                                            'onUploadSuccess' : function(file, data, response) {
                                                data=$.parseJSON(data);
                                                var imageUrl = data.image?data.url:'__STATIC__/image/default.png';
                                                var li="<li path='"+data.path+"' url='"+data.url+"'><img src='"+imageUrl+"' class='hd-w80 hd-h70'/></li>";
                                                $("#uploadList ul").prepend(li);
                                            }
                                        });
                                    });
                                </script>
                                <div id="uploadList">
                                    <ul>
                     
                                    </ul>
                                </div>
                            </div>  
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">商品详细</th>
                <td>
                    <script id="editor" type="text/plain" style="width:1024px;height:500px;" name="info"></script>
                    <script>
                       var ue = UE.getEditor('editor');
                    </script>
                	
                </td>
                <td></td>
            </tr>
            
            <tr>
                <th class="w100">售后服务</th>
                <td>
                    <script id="editor1" type="text/plain" style="width:1024px;height:500px;" name="service"></script>
                    <script>
                       var ue = UE.getEditor('editor1');
                    </script>
                    
                </td>
                <td></td>
            </tr>
        
        </table>
        <p class="btn">商品属性</p>
        <table class="hd-table hd-table-list">
            <tbody class="sx">
            <tr>
            <td align="left">袖长</td>
                <td height="50">
                <select name="" class="attr">
                        
                   <option value="九分袖">九分袖</option> 
                      
                </select>

               </td>
           </tr>
            
            </tbody>
        </table>
        <p class="btn">商品规格</p>
        <table class="hd-table hd-table-list">
            <tbody class="gg">
                 <tr>
                 <td align="left">袖长</td>
                     <td height="50">
                     <input type="text" name="gtvalue" class="0" />
                    </td>
                     <td height="50">
                     附加价格:<input type="text" name="added" class="guige" />
                    </td>
                     <td height="50">
                     <input type="button" name="" class="hd-btn hd-btn-primary hd-btn-xm" value="增加规格" />
                    </td>
                </tr>
             
            </tbody>
        </table>
        <div class="position-bottom">
            <input type="submit" class="hd-btn hd-btn-success" value="添加"/>
        </div>
    </form>
</div>
</body>
</html>